package com.woniuxy.contract.service.impl;

import com.woniuxy.commons.entity.Contract;
import com.woniuxy.contract.mapper.ContractMapper;
import com.woniuxy.contract.service.ContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author author
 * @create 2021-11-10 11:24
 */
@Service
public class ContractServiceImpl implements ContractService {

    @Resource
    private ContractMapper contractMapper;

    @Override
    public void addContract(Contract contract) {
        contractMapper.addContract(contract);
    }

    @Override
    public void delectContractByid(int conid) {
        contractMapper.delectContractByid(conid);
    }

    @Override
    public void updateContract(Contract contract) {
        contractMapper.updateContract(contract);
    }

    @Override
    public void selectContractByConid(int conid) {
        contractMapper.selectContractByConid(conid);
    }

    @Override
    public List<Contract> selectAllContractByPage(Contract contract, Integer pageIndex, Integer pageSize) {
        return contractMapper.selectAllContractByPage(contract, pageIndex, pageSize);
    }

    @Override
    public int selectContractCountByPage(Contract contract) {
        return contractMapper.selectContractCountByPage(contract);
    }
}
